/**
 * 
 */
package com.easidea.tim.entity.inventory;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springside.core.dao.extend.Undeletable;

import com.easidea.tim.entity.BaseEntity;

/**
 * 盘点明细
 * @author Harrison
 *
 */

@Entity(name="tim_inventory_inventory_item")
@org.hibernate.annotations.Entity(dynamicInsert=true,dynamicUpdate=true)
@Cache(region="tim_inventory_inventory_item",usage=CacheConcurrencyStrategy.READ_WRITE)
@Undeletable(status="deleted")
public class InventoryItem extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3461209768109719767L;

	private Inventory inventory;
	private Double meterNum;
	

	/**
	 * @return the inventory
	 */
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="inventory_id",nullable=false)
	public Inventory getInventory() {
		return inventory;
	}
	/**
	 * @param inventory the inventory to set
	 */
	public void setInventory(Inventory inventory) {
		this.inventory = inventory;
	}
	/**
	 * @return the meterNum
	 */
	@Column(name="meter_num",length=5,precision=1)
	public Double getMeterNum() {
		return meterNum;
	}
	/**
	 * @param meterNum the meterNum to set
	 */
	public void setMeterNum(Double meterNum) {
		this.meterNum = meterNum;
	}
	
}
